﻿using IntelligentAgriculture.Domain.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IntelligentAgriculture.Domain.Interface
{
    // 仓储接口
    public interface IHistoryRecordRepository
    {
        /// <summary>
        /// 种母历史记录显示
        /// </summary>
        /// <returns>返回数据</returns>
        Task<List<Historyrecord>> GetHistoryRecordsAsync();


        /// <summary>
        /// 逻辑删除种母历史记录数据
        /// </summary>
        /// <param name="hrid">主键id</param>
        /// <returns>受影响的行数</returns>
        Task<int> DeleteHistoryrecord(int hrid);


        /// <summary>
        /// 批量逻辑删除种母历史记录表
        /// </summary>
        /// <param name="hrids">id</param>
        /// <returns>返回数据</returns>
        Task<int> DeleteRangeHistoryrecord(IEnumerable<int> hrids);


        /// <summary>
        /// 添加种母历史记录数据
        /// </summary>
        /// <param name="inputs">实体</param>
        /// <returns>返回受影响的行数</returns>
        Task<int> AddHistoryrecordAsync(List<Historyrecord> inputs);

        /// <summary>
        /// 反填种母历史记录表
        /// </summary>
        /// <param name="earTag">根据耳号反填</param>
        /// <returns>返回数据</returns>
        Task<Historyrecord> GetByIdAsync(string? earTag);
        /// <summary>
        /// 修改种母历史记录表
        /// </summary>
        /// <param name="input">实体</param>
        /// <returns>返回受影响的行数</returns>
        Task<int> UpdateHisRecordAsync(Historyrecord input);
        /// <summary>
        /// 批量修改种母历史记录表
        /// </summary>
        /// <param name="input">实体</param>
        /// <returns>返回受影响的行数</returns>
        Task<int> ListUpdateHisRecordAsync(List<Historyrecord> input);

    }
}
